@if(count($topics))
    <div class="tt-topic-list">
        <div class="tt-list-header">
            <div class="tt-col-topic">话题</div>
            <div class="tt-col-category">分类</div>
            <div class="tt-col-value hide-mobile">喜欢</div>
            <div class="tt-col-value hide-mobile">回复</div>
            <div class="tt-col-value hide-mobile">查看</div>
            <div class="tt-col-value">活跃</div>
        </div>
        @foreach($topics as $topic)
            <div class="tt-item">
            <div class="tt-col-avatar">
                <img src="{{ $topic->user->avatar }}"
                     class="img-responsive img-circle" width="50px" height="50px" alt="{{ $topic->user->name }}">
            </div>
            <div class="tt-col-description">
                <h6 class="tt-title"><a href="{{ $topic->link() }}">
                        {{--<svg class="tt-icon">--}}
                            {{--<use xlink:href="#icon-pinned"></use>--}}
                        {{--</svg>--}}
                        {{ $topic->title }}
                    </a></h6>
                <div class="row align-items-center no-gutters">
                    <div class="col-11">
                        <ul class="tt-list-badge">
                            <li class="show-mobile"><a href="#"><span class="tt-color01 tt-badge">politics</span></a></li>
                            <li><a href="#"><span class="tt-badge">contests</span></a></li>
                            <li><a href="#"><span class="tt-badge">authors</span></a></li>
                        </ul>
                    </div>
                    <div class="col-1 ml-auto show-mobile">
                        <div class="tt-value">1h</div>
                    </div>
                </div>
            </div>
            <div class="tt-col-category"><a href="{{ route('categories.show', $topic->category_id) }}" title="{{ $topic->category->name }}"><span class="tt-color{{ add_zero($topic->category->id) }} tt-badge">{{ $topic->category->name }}</span></a></div>
            <div class="tt-col-value hide-mobile">985</div>
            <div class="tt-col-value tt-color-select  hide-mobile">{{ $topic->reply_count }}</div>
            <div class="tt-col-value hide-mobile">15.1k</div>
            <div class="tt-col-value hide-mobile">{{ $topic->created_at->diffForHumans() }}</div>
        </div>
        @endforeach
        {{--<div class="tt-row-btn">--}}
            {{--<button type="button" class="btn-icon js-topiclist-showmore">--}}
                {{--<svg class="tt-icon">--}}
                    {{--<use xlink:href="#icon-load_lore_icon"></use>--}}
                {{--</svg>--}}
            {{--</button>--}}
        {{--</div>--}}
    </div>
@else
    <div class="empty-block">暂无数据 ~_~ </div>
@endif

{{-- 分页 --}}
<div class="tt-row-btn">
    {!! $topics->render() !!}
</div>